#pragma once

#include <QString>
#include <QMetaType>

namespace kryptos { namespace ui {

class ContactWrapper
{
public:

    enum Type{ SINGLEKEY, GROUP};

    ContactWrapper()
    {
    }

    ContactWrapper(const ContactWrapper& cw)
    {
        m_type = cw.type();
        m_recipient = cw.recipient();
    }

    ContactWrapper(Type type)
    {
        m_type = type;
    }

    ContactWrapper(Type type, QString recipient)
    {
        m_type = type;
        m_recipient = recipient;
    }

    Type    type     () const { return m_type;}
    QString typeStr  () const { return m_type == SINGLEKEY ? "key" : "group";}
    QString recipient() const { return m_recipient;}

private:

    QString m_recipient;
    Type    m_type;
};

}}

Q_DECLARE_METATYPE(kryptos::ui::ContactWrapper)
